#! /bin/bash

echo "start mqtt server"
pid=$(ps -ef | grep "mosquitto" | grep -v grep | awk '{print $2}')
echo "$pid"
if [ -n "$pid" ]; then
	(sudo kill -9 "$pid")
fi
mosquitto -p 51284 &